<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property float $amount 单价
 * @property int $id
 * @property int $num 数量
 * @property int $order_id 订单
 * @property int $returntime 退货时间
 * @property int $spec_id 规格
 * @property int $super_id 商品
 * @property string $createtime
 * @property string $return_express 退货快递公司
 * @property string $return_waybill 退货单号
 * @property-read \app\model\Super $super
 * @property-read \app\model\SuperOrders $orders
 * @property-read \app\model\SuperOrdersAssess[] $assess
 * @property-read \app\model\SuperSpec $spec
 * @mixin \think\Model
 */
class SuperOrdersDetail extends Model
{
	protected $createTime = 'createtime';
	
	function super()
	{
		return $this->belongsTo(Super::class,'super_id');
	}
	
	function spec()
	{
		return $this->belongsTo(SuperSpec::class,'spec_id');
	}
	
	function assess()
	{
		return $this->hasMany(SuperOrdersAssess::class,'order_detail_id');
	}
	
	function orders()
	{
		return $this->belongsTo(SuperOrders::class,'order_id');
	}
}
